package com.example.hystrix.feign;

import com.example.hystrix.domain.Goods;

/**
 * Feign 客户端的降级处理类
 * 1.定义类 实现Feign客户端接口
 * 2.实现@Component注解将该类Bean加入Spirng容器当中
 */
 @Component
public class GoodsFeignClientFallback implements GoodsFeignClient{
    @Override
    public Goods findGoodsById(int id) {
        Goods goods = new Goods();
        goods.setTitle("又被降级了");
        return goods;
    }
}
